!!: HISTORY -- comments extracted from the old GDR implementation begun by
!!             Prashant Hebbar in 1989.

/**********************************************************************
	GDR - THE INTERACTIVE GRAPH DRAWING ROUTINES.
	File : gr.c .
	Written by Prashant Hebbar
	#includes : gr.h .
	Other modules: gr_tool.c, pane.c, list.c .
	Jan 4 1990. Dept. of Comp. Sc., N.C.S.U.,  Raleigh, NC.
		***
		Many Thanks to Doug Thomae, who helped all the time!
		***
	*******
	April 12 : changed p_menu() for leavewindow events
	April 13 : added hilite GC.
	Modified 20 March 1992 by Matthias Stallmann
	  - added fonts for messages, vertex and edge labels
	  - cosmetic changes to code
	14 January 1994:
	  - added main_pixmap as backing store for the main_window
	    (formerly called win) 
	27 Nov 2001 - converted to ANSI C
**********************************************************************/

/************************************************************************
	TOOL BOX ROUTINES FOR GDR.
	File : gr_tool.c .
	Written by Prashant Hebbar
	Modified by Matthias Stallmann
	#includes : gr.h .
	Other modules : gr.c, pane.c, list.c .
	April 4 1990.
	******
	April 12 : sleep() changed to usleep().
			arrows blinked.
			added vertex fns for maxvx, valid, and get a vx.
	April 13 : hilighting & clearing edge and vertex.
	May 7 : changed delete_edge() for mult. edges.
		delete_ej() UNCHANGED.
	May 9 : changing move_vx_ej(), updated calc_label_pos to vector
		products instead of acos{was giving DOMAIN ERROR}.
	6-21-91: changed the computation of labels and knot points when
		vertices are moved:
			a) labels and knot points retain same relative
			clockwise position wrt to fixed vertex
			b) no longer prompts for knot points of
			self-loop when vertex is moved
	3-9-92: changed calls to draw_edge in put_edge so that highlighted
                edges are fatter than regular ones, but not doubled
        3-10-92: changed get_ej_at_xy (it wasn't working properly)
	         added near_segment to test whether a point is close to a
		     line segment
		 changed draw_edge so that it draws a straight line if knots
		     are close to a straight line
	3-23-92: added mov_elab_window to consolidate the code for
	         centering edge label windows (and make it dependent on font) 
	1-14-94: changed so that all drawing is done to main pixmap
	         instead of window (see gr.c for more explanation) 
	1-24-94: added redraw_vertex_label, redraw_edge_label, and
	         handle_background_event 
   27 Nov 2001 - fixed prototypes for ANSI C
************************************************************************/

/************************************************************************
	PANE MENU ROUTINES.
	File : pane.c
	April 4 1990.
	***
	April 12 : changed delet() for vert/horizontal edge deletion.	
	April 19 : trying for multiple edges.
	April 27 : trying to make delete work!
	May 5 :  changed edit_label for vxs.
	May 6 : init_knot().
	May 15: changed creat_vx in terms of add_vertex().
	Jun 27: removed mult_edge().
   28 Nov 2001 - made ANSI compliant
************************************************************************/

/************************************************************************
	ROUTINES TO BE USED BY THE USER .
	File : list.c
	#includes : gr.h
	April 4 1990.
	***
	added get ej functions.
	April 13 : changed || !direct to && direct in get functions.
	April 15 : added add_edge().
	May 15 :  add_vx_lst() mod. for loops, add_vertex().
	May 16 : is_exposed, is_highlighted,expose_label,hide_label.
	Aug 27 : added select_vertex (MS)
	Mar 3, 1992: added checking for length of label strings (MS)
	Mar 6, 1992: got rid of delay parameter for blink_vertex and blink_edge
	             (instead, the delay is determined by the constant
				 BLINK_DELAY, defined in gr.h)
    Mar 9, 1992: changed blink_edge and highlight_edge so that highlighting
	             creates a fatter edge rather than doubling the edge
    May 13, 1992: eliminated pwin parameter for query and made query
                  coordinates relative to visible part of window
    Jan 14, 1994: changed drawing functions so that they draw to pixmap rather
                  than main window (see gr.c for more explanation)
    Jun 3, 1996: fixed a deallocation bug in write_text_window and
	         redraw_text_window (didn't cause problems under ULTRIX or
		 SunOS)
    27 Nov 2001 - converted to ANSI C
************************************************************************/

2004-02-25 Discovered bug in minimize: DFA with 4 states keeps telling me
           that I have multiple transitions on symbol 0.  This bug does not
           show up on Sparc Ultra machines -- it first appeared on a newer
           Sun machine in Daniels 147.  The troublesome file is bug_ex.gdr.
